import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: "/", 
    redirect: "index"
  },
  {
      path: "/index", // 首页
      name: "Index",
      component:  () => import('../views/index.vue'),
  }, {
      path: "/pageA",
      name: "pageA",
      component:  () => import('../views/pageA.vue'),
  }, {
    path: "/pageB",
    name: "pageB",
    component:  () => import('../views/pageB.vue'),
  }, {
    path: "/statistics",
    name: "statistics",
    component:  () => import('../views/statistics.vue'),
  }
];

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
